package de.koller.renderEngine.physics;

import org.jbox2d.common.Vec2;

public class Szene {

	public static PhysicsRoot gen() {
		PhysicsRoot proot = new PhysicsRoot();
		
		for( int x = 5; x < 40; x += 2 )
			for( int y = -150; y < 5; y += 2 )
				new Cube( new Vec2( x, y ), new Vec2( 1, 1 ), proot.getWorld(), 0, false, true );
		
//		for( int x = 20; x <= 20; x += 2 )
//			for( int y = -5000; y < 5; y += 2 )
//				new Cube( new Vec2( x, y ), new Vec2( 1, 1 ), proot.getWorld(), 0, false, true );
		
		new Cube( new Vec2( 0, 20 ), new Vec2( 1, 80 ), proot.getWorld(), 0, true, true );
		new Cube( new Vec2( 30, 30 ), new Vec2( 80, 1 ), proot.getWorld(), 40, true, true );
		new Cube( new Vec2( 80, 60 ), new Vec2( 80, 1 ), proot.getWorld(), -20, true, true );
		new Cube( new Vec2( 50, 60 ), new Vec2( 1, 20 ), proot.getWorld(), 0, true, true );
		new Cube( new Vec2( 119, 30 ), new Vec2( 1, 80 ), proot.getWorld(), 0, true, true );
		
		return proot;
	}
	
	public static void main( String[] args ) {
		
		new PyIO( "./output/pdata.pcd", 60*60 ).write( gen() );
	}
	
}
